<template>
	<view class="content">
		<view class="title">
			登录
		</view>
		<view class="row-input">
			<image src="https://vkceyugu.cdn.bspapp.com/VKCEYUGU-a1714171-183a-4753-b538-8fabcab0d8b6/e1af2d9b-448b-404d-93f5-9f7730124170.png"></image>
			<input placeholder="邮件或用户名" maxlength="18" />
		</view>
		<view class="row-input">
			<image src="https://vkceyugu.cdn.bspapp.com/VKCEYUGU-a1714171-183a-4753-b538-8fabcab0d8b6/e99ee86b-bfe4-4378-b357-902228d4823c.png"></image>
			<input placeholder="密码" maxlength="18" :password="!isShowPassword" />
			<image v-if="isShowPassword" @click="showOrHide" src="https://vkceyugu.cdn.bspapp.com/VKCEYUGU-a1714171-183a-4753-b538-8fabcab0d8b6/1830d49b-8aff-4db7-a4c7-002ff49a7906.png"></image>
			<image v-else @click="showOrHide" src="https://vkceyugu.cdn.bspapp.com/VKCEYUGU-a1714171-183a-4753-b538-8fabcab0d8b6/8102c6cc-adea-4f81-96c7-34d9efb04200.png"></image>
		</view>
		<view class="menu-link">
			<text @click="register">没有账号?</text>
		</view>
		<view class="login-btn">登录</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				isShowPassword: true,
			}
		},
		methods: {
			// 显示密码/隐藏密码
			showOrHide() {
				this.isShowPassword = !this.isShowPassword
			},

			// 注册
			register() {
				uni.navigateTo({
					url: '/pages/login24/register'
				})
			}
		}
	}
</script>

<style lang="scss">
	.content {
		padding: 0 60rpx;
	}

	.title {
		padding-bottom: 50rpx;
		height: 200rpx;
		display: flex;
		justify-content: flex-start;
		align-items: center;
		font-size: 60rpx;
		letter-spacing: 5rpx;
		color: #585858;
	}

	.row-input {
		display: flex;
		justify-content: flex-start;
		align-items: center;
		height: 110rpx;
		border-bottom: 1rpx solid #ededed;

		image {
			margin: 0 20rpx;
			flex-shrink: 0;
			width: 36rpx;
			height: 40rpx;
		}

		input {
			width: 480rpx;
			font-size: 30rpx;
		}
	}

	.menu-link {
		display: flex;
		justify-content: flex-end;
		line-height: 100rpx;
		font-size: 28rpx;
		color: #6a75cf;
		padding-bottom: 20rpx;
	}

	.login-btn {
		display: flex;
		justify-content: center;
		align-items: center;
		width: 100%;
		color: #FFFFFF;
		font-size: 38rpx;
		letter-spacing: 5rpx;
		height: 110rpx;
		border-radius: 20rpx;
		background-color: #4772fb;
	}
</style>
